package com.linkage.lcims.base.po.business;

import java.io.Serializable;
import java.util.Date;
import java.util.Set;
import org.apache.commons.lang.builder.ToStringBuilder;


/** 
 *        @hibernate.class
 *         table="BD_TOLL_POLICY"
 *     
*/
@SuppressWarnings("serial")
public class BdTollPolicy implements Serializable {

    /** identifier field */
    private Integer policyid;

    /** persistent field */
    private String policyname;

    /** persistent field */
    private Date effdate;

    /** persistent field */
    private Date expdate;

    /** nullable persistent field */
    private String description;

    /** persistent field */
    private Set<BdTollAttrPolicy> bdTollAttrPolicies;

    /** persistent field */
    private Set<BdGroupId> bdGroupIds;

    /** full constructosr */
    public BdTollPolicy(Integer policyid, String policyname, Date effdate, Date expdate, String description, Set<BdTollAttrPolicy> bdTollAttrPolicies, Set<BdGroupId> bdGroupIds) {
        this.policyid = policyid;
        this.policyname = policyname;
        this.effdate = effdate;
        this.expdate = expdate;
        this.description = description;
        this.bdTollAttrPolicies = bdTollAttrPolicies;
        this.bdGroupIds = bdGroupIds;
    }

    /** default constructor */
    public BdTollPolicy() {
    }

    /** minimal constructor */
    public BdTollPolicy(Integer policyid, String policyname, Date effdate, Date expdate, Set<BdTollAttrPolicy> bdTollAttrPolicies, Set<BdGroupId> bdGroupIds) {
        this.policyid = policyid;
        this.policyname = policyname;
        this.effdate = effdate;
        this.expdate = expdate;
        this.bdTollAttrPolicies = bdTollAttrPolicies;
        this.bdGroupIds = bdGroupIds;
    }

    /** 
     *            @hibernate.id
     *             generator-class="assigned"
     *             type="java.math.Integer"
     *             column="POLICYID"
     *         
     */
    public Integer getPolicyid() {
        return this.policyid;
    }

    public void setPolicyid(Integer policyid) {
        this.policyid = policyid;
    }

    /** 
     *            @hibernate.property
     *             column="POLICYNAME"
     *             length="50"
     *             not-null="true"
     *         
     */
    public String getPolicyname() {
        return this.policyname;
    }

    public void setPolicyname(String policyname) {
        this.policyname = policyname;
    }

    /** 
     *            @hibernate.property
     *             column="EFFDATE"
     *             length="7"
     *             not-null="true"
     *         
     */
    public Date getEffdate() {
        return this.effdate;
    }

    public void setEffdate(Date effdate) {
        this.effdate = effdate;
    }

    /** 
     *            @hibernate.property
     *             column="EXPDATE"
     *             length="7"
     *             not-null="true"
     *         
     */
    public Date getExpdate() {
        return this.expdate;
    }

    public void setExpdate(Date expdate) {
        this.expdate = expdate;
    }

    /** 
     *            @hibernate.property
     *             column="DESCRIPTION"
     *             length="100"
     *         
     */
    public String getDescription() {
        return this.description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    /** 
     *            @hibernate.set
     *             lazy="true"
     *             inverse="true"
     *             cascade="none"
     *            @hibernate.collection-key
     *             column="POLICYID"
     *            @hibernate.collection-one-to-many
     *             class="com.linkage.lcims.base.po.business.BdTollAttrPolicy"
     *         
     */
    public Set<BdTollAttrPolicy> getBdTollAttrPolicies() {
        return this.bdTollAttrPolicies;
    }

    public void setBdTollAttrPolicies(Set<BdTollAttrPolicy> bdTollAttrPolicies) {
        this.bdTollAttrPolicies = bdTollAttrPolicies;
    }

    /** 
     *            @hibernate.set
     *             lazy="true"
     *             inverse="true"
     *             cascade="none"
     *            @hibernate.collection-key
     *             column="POLICYID"
     *            @hibernate.collection-one-to-many
     *             class="com.linkage.lcims.base.po.business.BdGroupId"
     *         
     */
    public Set<BdGroupId> getBdGroupIds() {
        return this.bdGroupIds;
    }

    public void setBdGroupIds(Set<BdGroupId> bdGroupIds) {
        this.bdGroupIds = bdGroupIds;
    }

    public String toString() {
        return new ToStringBuilder(this)
            .append("policyid", getPolicyid())
            .toString();
    }

}
